#!/bin/sh
cd `dirname $0`
XENGINE_HOME=`pwd`
HOSTNAME=`hostname`

XENGINE_NODE=xengine@${HOSTNAME}

[ -f $XENGINE_HOME/etc/xengine.cfg ] && .  $XENGINE_HOME/etc/xengine.cfg

exec erl -pa $PWD/ebin $PWD/deps/*/ebin -s init_mnesia   -name $XENGINE_NODE   -mnesia dir db 
